// 开学时间
let startTime = new Date('2021-8-30');

// 现在时间
let nowTime = new Date('2021-8-31');

function getWeekOrDay(nowTime,str) {
    if(str == 'nowDay') {
        return ((nowTime - startTime) / 1000 / 60 / 60 / 24 ) + 1;
    }else if(str == 'WeekDay') {
        return ((nowTime - startTime) / 1000 / 60 / 60 / 24 % 7) + 1;
    }else if(str == 'Week') {
        return ((nowTime - startTime) / 1000 / 60 / 60 / 24 / 7) + 1;
    }
}

console.log(`今天是开学的第${parseInt(getWeekOrDay(nowTime,'nowDay'))}天-第${parseInt(getWeekOrDay(nowTime,'Week'))}周的第${parseInt(getWeekOrDay(nowTime,'WeekDay'))}天`);

// console.log(nowTime - startTime);